package cn.crce.cloud9.simple;

/**
 * @author OnCloud9
 * @description
 * @project NRCE-TEST
 * @date 2022年09月10日 上午 11:22
 */
public class Case42 {
    public static void main(String[] args){
        PrintStrings p = new PrintStrings(-1);
        //***************************Found*********************
        Thread t = new Thread(p);
        t.start( );
    }
}

//***************************Found*********************
class PrintStrings implements Runnable{
    int ind = 0 ;
    //***************************Found*********************
    String[] strings = { "one", "two", "three", "four", "five"};

    public PrintStrings( int n) {
        if( n < 0)
            n = 0;
        else if ( n >= strings.length)
            //***************************Found*********************
            n = strings.length-1 ;
        ind = n;
    }
    //***************************Found*********************
    public void run( ){
        while(ind < strings.length){
            System.out.print(strings[ind] + "  ");
            //***************************Found*********************
            ind ++;
        }
        System.out.println();
    }
}